package com.gmail.andersoninfonet.mvc.logica;

import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.gmail.andersoninfonet.dao.ContatoDAO;
import com.gmail.andersoninfonet.modelo.Contato;

public class RemoveContatoLogic implements Logica{

	@Override
	public void executa(HttpServletRequest req, HttpServletResponse res)throws Exception {
		
		Contato c = new Contato();
		ContatoDAO dao = new ContatoDAO();
		long id = Long.parseLong(req.getParameter("id"));
		
		
		dao.remove(c);
		
		RequestDispatcher rd = req.getRequestDispatcher("/remove.jsp");
		rd.forward(req, res);
		
	}

}
